package com.ben.multiple.jasypt;

import lombok.AllArgsConstructor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

/**
 * @author Ben
 * @date 2020/2/10
 */
@Configuration
@EnableConfigurationProperties(JasyptModel.class)
@AllArgsConstructor
public class JasyptConfig {
    private final JasyptModel jasyptModel;
    @PostConstruct
    private void init(){
        String username = jasyptModel.getUsername();
        String password = jasyptModel.getPassword();
        System.out.println(username);
        System.out.println(password);
    }
}
